package com.yonyou.pmclouds.constructionlog.rmiitf;

import com.yonyou.pmclouds.basecom.entity.PageObject;
import com.yonyou.pmclouds.basecom.entity.SuperVO;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.constructionlog.entity.ConstructionLogListViewVO;
import com.yonyou.pmclouds.constructionlog.entity.ConstructionLogRefVO;
import com.yonyou.pmclouds.constructionlog.entity.ConstructionLogVO;
import com.yonyou.pmclouds.inspectitem.entity.InspectItemVO;
import com.yonyou.pmclouds.siteinspection.entity.SiteInspectionVO;

import java.util.List;
import java.util.Map;

public interface ConstructionLogQuery {
    /**
     * 根据项目查询项目下面的所有的现场检查单据
     * @param pk_project
     * @return
     * @throws BusinessException
     */
    ConstructionLogListViewVO[] queryByProject(String pk_project) throws BusinessException;
    /**
     * 根据现场检查主键查询
     * @param pk_siteinspection
     * @return
     * @throws BusinessException
     */
    ConstructionLogVO queryOne(String pk_siteinspection) throws BusinessException;
    /**
     * 根据检查项主键查询检查项详情
     * @param pk_inspectItem
     * @return
     * @throws BusinessException
     */
    InspectItemVO queryItemDetail(String pk_inspectItem) throws BusinessException;
    /**
     * 根据ids查询code对应的基础数据是否被引用
     * @param code
     * @param ids
     * @return
     * @throws BusinessException
     */
    boolean queryRefByIds(String code, String[] ids) throws BusinessException;
    /**
     * 根据项目查询施工记录单
     * @param pk_project
     * @return
     * @throws BusinessException
     */
    ConstructionLogRefVO[] queryRefsByProject(String pk_project) throws BusinessException;
    /**
     * 根据主键集合查询施工记录单
     * @param ids
     * @return
     * @throws BusinessException
     */
    ConstructionLogRefVO[] queryByIds(String[] ids) throws BusinessException;

    /**
     * 根据对应的参数获取符合要求的数据（用于多条件查询）
     *
     * @param params
     * @return com.yonyou.pmclouds.constructionlog.entity.ConstructionLogVO[]
     * @author yzx
     * @date 2018/5/28 10:16
     */
    List<ConstructionLogVO> queryVosByParams(Map<String, Object> params) throws BusinessException;


    /**
     * 根据条件查询施工记录
     *
     * @param creators
     * @param startDate
     * @param endDate
     * @param billStatus
     * @param start
     * @param size
     *
     * @return
     * @throws BusinessException
     */
    PageObject<Object> queryByCondition(String[] pkProject,
                                         String[] creators,
                                         String startDate,
                                         String endDate,
                                         int[] billStatus,
                                         int start,
                                         int size) throws BusinessException;
}
